{include file="public/header"}
<body>
<fieldset class="layui-elem-field">
    <legend>流水交易管理</legend>
    <div class="layui-field-box">
        <form id="seachForm" method="" action="" class="layui-form">
             <div class="layui-inline">
                <label class="layui-form-label">代理商</label>
                <div class="layui-input-inline">
                    <input type="text" name="agent_name" value="" placeholder="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">商户号</label>
                <div class="layui-input-inline">
                    <input type="text" name="mer_id" value="" autocomplete="off" class="layui-input">
                </div>
            </div>
             <div class="layui-inline">
                <label class="layui-form-label"  style="width:86px;">交易日期</label>
                <div class="layui-input-inline">
                    <input type="text" name="trade_date" value="" autocomplete="off" class="layui-input">
                </div>
            </div>
             <div class="layui-inline">
                <label class="layui-form-label" style="width:86px;">交易类型</label>
                <div class="layui-input-inline">
                    <input type="text" name="settle_type" value="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <button id="seach" type="submit" class="layui-btn layui-btn-normal"><i class="layui-icon">&#xe615;</i> 查找</button>
        </form>

        <table class="layui-table" lay-even>
            <thead>
            <tr>
                <th>ID</th>
                <th>商户号</th>
                <th>商户名称</th>
                <th>所属代理商</th>
                <th>交易金额</th>                
                <th>手续费</th>
                <th>渠道利润</th>
                <th>网关成本</th>
                <th>层级返佣</th>
                
            </tr>
            </thead>
            <tbody  id="searchContent">
                {volist name="list" id="vo"}
                <tr>
                    <td>{$vo['id']}</td>
                    <td>{$vo['mer_id']}</td>
                    <td>{$vo['mer_name']}</td>
                    <td>{$vo['agent_name']}</td>
                    <td>{$vo['trade_money']}</td>
                    <td>{$vo['fee']}</td>
                    <td>{$vo['profit']}</td>
                    <td>{$vo['gateway_cost']}</td>
                    <td>{$vo['return']}</td>
                    
                </tr>
                {/volist}
            </tbody>
        </table>
        {$page}
    </div>
</fieldset>


{include file="public/footer"}
<script>
   
   layui.use(['upload','layer'], function(){
            layui.upload({
                url: "{:url('addTradeBill')}",
                before:function(){
                    var index = layer.load(1, {
                    shade: [0.1,'#fff'] //0.1透明度的白色背景
                    });
                },
                success: function(res){
                   
                    if(res.errorCode > 0){
                        dialog.error(res.msg);
                    }
                    else{
                         dialog.success(res.msg,function(){
                             location.reload();
                         });
                    }
                }
 
            });
        });
   

</script>
</body>
</html>